package forum.client;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;

public class DeleteHandler implements ClickHandler {

	private TreeUserObject uo;
	private MainScreen ms;
	private Button modify;
	public DeleteHandler(TreeUserObject o, MainScreen ms, Button md){
		this.uo = o;
		this.ms = ms;
		this.modify = md;
	}
	@Override
	public void onClick(ClickEvent event) {
		this.ms.deletePost(this.uo.getPostId(), this.uo.getPostContent().getText(), this.modify);
	}

}
